package com.ruoyi.project.distribute.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.distribute.domain.ProvideDrug;
import com.ruoyi.project.distribute.service.IProvideDrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author anran
 */
@RestController
@RequestMapping("/distribute/update")
public class ProvideDrugController extends BaseController
{
    @Autowired
    private IProvideDrugService provideDrugService;

    /**
     * 查询生产厂家信息
     */
    @GetMapping("/get")
    @PreAuthorize("@ss.hasPermi('distribute:update:list')")
    public TableDataInfo list(Long provideId)
    {
        System.out.println(provideId);
        startPage();
        List<ProvideDrug> list = provideDrugService.selectProvideDrugList(provideId);
        System.out.println(list);
        return getDataTable(list);
    }

}
